<template>
	<view>
		<uv-navbar title="编辑" bg-color="rgba(255,255,255,1)" :placeholder='true' leftIconSize="20px"
			leftIconColor="#313C56" :autoBack='true' titleStyle="font-size: 16px;font-weight: 500;color: #313c56;">
			<template v-if="type == 0" v-slot:right>
				<view class="font-14 font-weight-regular" style="color: #313C56;" @click="edit">编辑</view>
			</template>
		</uv-navbar>
		<scroll-view :scroll-y="true" :style="{height: $uv.addUnit(scrollHeight)}">
			<view class="flex-column" style="margin-left: 16px; margin-right: 16px;">
				<publish-item title="公司名称" :value="''" requisite></publish-item>
				<publish-item title="公司简介" :value="''" requisite touchDisabled=""></publish-item>
				<view class="flex-row flex-items-center font-14 font-weight-regular"
					style="height: 54px; color: #313C56;">
					<image src="../../static/xinghao.png" style="width: 8px; height: 8px; margin-right: 4px;"></image>
					添加图片
				</view>
				<uv-upload :fileList="[]" :maxCount="1" width="80" height="80">
					<view class="flex-row-center"
						style="background-color: white; width: 80px; height: 80px; border: 1px solid #EFF0F4;">
						<image src="../../static/add.png" style="width: 28px;height: 28px;"></image>
					</view>
				</uv-upload>
				<view class="flex-row flex-items-center font-14 font-weight-regular"
					style="height: 54px; color: #313C56;">
					<image src="../../static/xinghao.png" style="width: 8px; height: 8px; margin-right: 4px;"></image>
					上传logo
				</view>
				<uv-upload :fileList="[]" :maxCount="1" width="80" height="80">
					<view class="flex-row-center"
						style="background-color: white; width: 80px; height: 80px; border: 1px solid #EFF0F4;">
						<image src="../../static/add.png" style="width: 28px;height: 28px;"></image>
					</view>
				</uv-upload>
			</view>

		</scroll-view>
		<view class="font-16 font-weight-regular flex-row-center"
			style="margin-top: 12px; margin-left: 36px; margin-right: 36px; height: 44px; border-radius: 22px; background-color: #EB7520; color: white;">
			提交
		</view>
		<toast ref="toast"></toast>
	</view>
</template>

<script>
	import publishItem from "@/components/publish-item/publish-item.vue"
	export default {
		components: {
			publishItem
		},
		data() {
			return {

			}
		},
		computed: {
			statusBarHeight() {
				const sys = uni.$uv.sys()
				return sys.statusBarHeight
			},
			navbarHeight() {
				return this.statusBarHeight + 44
			},
			screenWidth() {
				const sys = uni.$uv.sys()
				return sys.windowWidth
			},
			pageHeight() {
				const sys = uni.$uv.sys()
				return sys.windowHeight - this.navbarHeight
			},
			scrollHeight() {
				return this.pageHeight - this.toolbarHeight - 10
			},
			toolbarHeight() {
				const sys = uni.$uv.sys()
				return sys.safeAreaInsets.bottom + 68
			}
		},
		methods: {

		}
	}
</script>

<style>
	page {
		background-color: white;
	}
</style>